package com.yuexun.dhdoctor.widget;

import android.app.Dialog;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.widget.ImageView;


import com.yuexun.dhdoctor.R;

import java.io.File;

/**
 * Created by Administrator on 2017/3/10 0010.
 */

public class ViewShowDialog extends Dialog {

    private ImageView viewShow;
    File writeFile;

    public ViewShowDialog(Context context, File writeFile) {
        super(context, R.style.loadingDialogStyle);
        this.writeFile = writeFile;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_view_show);
        viewShow = (ImageView) this.findViewById(R.id.view_show);

        if(writeFile != null){
            Bitmap bmp= BitmapFactory.decodeFile(writeFile.toString());
            viewShow.setImageBitmap(bmp);
        }
    }
}
